/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package polloBeta;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

/**
 *
 * @author bender
 */
public class Partidas extends JFrame implements ActionListener{

        JPanel partida,par,tida,area;
        JButton btnCrear;
        JTextField nombre,jugador;


        //JTextArea tida;
        //JPasswordField pass;
        //JLabel msj;
        //ImageIcon logocrv;
        //JPanel LogoPanel;
        
        //String Nombre,Pass;
        //int acceso;

          Partidas() {
        super("Pollo Draw Partidas");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setResizable(false);

       partida = new JPanel();
       partida.setLayout(new BorderLayout());
       partida.setPreferredSize(new Dimension(500,550));

       tida = new JPanel();
       tida.setLayout(new BorderLayout());
       tida.setPreferredSize(new Dimension(200,550));

        area = new JPanel();
        area.setLayout(new BorderLayout());
        area.setPreferredSize(new Dimension(300,550));
/*
        tida = new JTextArea();
        tida.setPreferredSize(new Dimension(200,550));*/

        par = new JPanel();
        // administrador de diseño
  par.setLayout(new GridBagLayout());
  GridBagConstraints c = new GridBagConstraints();
  c.fill = GridBagConstraints.CENTER;

  nombre = new JTextField("",15);

  c.gridy = 0; // fila
  c.gridx = 0; // columna
  par.add(nombre,c);

  //espacio en blanco
  JLabel esp1 = new JLabel("       ");
  c.gridy = 1; // fila
  c.gridx = 0; // columna
  par.add(esp1,c);

  JLabel esp2 = new JLabel("Nombre");
  c.gridy = 2; // fila
  c.gridx = 0; // columna
  par.add(esp2,c);

  JLabel esp3 = new JLabel("       ");
  c.gridy = 3; // fila
  c.gridx = 0; // columna
  par.add(esp3,c);

   jugador = new JPasswordField("",15);
  c.gridy = 4; // fila
  c.gridx = 0; // columna
  par.add(jugador,c);

  JLabel esp4 = new JLabel("       ");
  c.gridy = 5; // fila
  c.gridx = 0; // columna
  par.add(esp4,c);

  JLabel esp5 = new JLabel("Numero de jugadores");
  c.gridy = 6; // fila
  c.gridx = 0; // columna
  par.add(esp5,c);

  JLabel esp6 = new JLabel("       ");
  c.gridy = 7; // fila
  c.gridx = 1; // columna
  par.add(esp6,c);

  btnCrear = new JButton("Crear partida");
  c.gridy = 8; // fila
  c.gridx = 0; // columna
  par.add(btnCrear,c);

  
        area.add(par,BorderLayout.CENTER);
        partida.add(area,BorderLayout.WEST);
        partida.add(tida,BorderLayout.EAST);
        add(partida);
        pack();
        setVisible(true);

        }
          
          public static void main(String[] args) {
              new Partidas();
    }

        public void actionPerformed(ActionEvent e) {
        JButton btn = (JButton)e.getSource();
        String comando = btn.getActionCommand();
        if(comando.equals("Entrar")){
            
            
        }
    }

}
